﻿<%@ Page Title="" Language="C#" MasterPageFile="~/WebmasterTool/Admin.Master" AutoEventWireup="true" CodeBehind="QuestionAdd.aspx.cs" Inherits="Framework.WebmasterTool.Questions.QuestionAdd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ctlCaption" runat="server">
    Thêm mới và cập nhật câu hỏi
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageContent" runat="server">
    <asp:Label ID="lblPermissionMessage" runat="server" Font-Bold="true" ForeColor="Red"
        Text="Tài khoản không có quyền truy cập vào trang này" Visible="false"></asp:Label>
    <asp:Panel ID="Panel1" runat="server" Visible="true">
        <table align="center" cellpadding="7" cellspacing="0" border="0">
            <tr>
                <td valign="top" colspan="2" align="center">
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" Font-Bold="true" DisplayMode="List"
                        ValidationGroup="ArticleAdd" />
                    <asp:Label runat="server" ID="lblMsg" ForeColor="red" Font-Bold="true"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>Tiêu đề</td>
                <td>
                    <asp:TextBox runat="server" ID="txtTitle" Width="250"></asp:TextBox></td>
            </tr>
            <tr>
                <td>Nội dung
                </td>
                <td>
                    <CKEditor:CKEditorControl ID="txtQuestion" runat="server" UIColor="#CED9F3" Width="600"
                        Height="200" Toolbar="Full" BasePath="/Plugins/Ckeditor" ContentsCss="/Plugins/Ckeditor/contents.css"
                        TemplatesFiles="/Plugins/Ckeditor/plugins/templates/templates/default.js">
                    </CKEditor:CKEditorControl>
                </td>
            </tr>
            <tr>
                <td>Audio</td>
                <td>
                    <asp:Literal runat="server" ID="ltAudio"></asp:Literal>
                    <asp:FileUpload runat="server" ID="VideoFile" Width="217px" /></td>
            </tr>
            <tr>
                <td>Sắp xếp</td>
                <td><asp:TextBox runat="server" ID="txtDisplayOrder"></asp:TextBox></td>
            </tr>
            <tr>
                <td colspan="2">
                    <b>Danh sách đáp án</b>
                </td>
            </tr>

            <tr id="pnUpdate" runat="server" visible="false">
                <td></td>
                <td>
                    <table>
                        <tr>
                            <td>Đáp án</td>
                            <td>Đáp án đúng</td>
                        </tr>
                        <tr>
                            <td>
                                <textarea style="width: 400px" rows="3" name="Answer"></textarea>
                            </td>
                            <td>
                                <input type="radio" value="0" name="Correct" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <textarea style="width: 400px" rows="3" name="Answer"></textarea>
                            </td>
                            <td>
                                <input type="radio" value="1" name="Correct" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <textarea style="width: 400px" rows="3" name="Answer"></textarea>
                            </td>
                            <td>
                                <input type="radio" value="2" name="Correct" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <textarea style="width: 400px" rows="3" name="Answer"></textarea>
                            </td>
                            <td>
                                <input type="radio" value="3" name="Correct" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr id="pnAdd" runat="server" visible="false">
                <td></td>
                <td>
                    <asp:Repeater runat="server" ID="rptAnswer" OnItemDataBound="rptAnswer_ItemDataBound">
                        <HeaderTemplate>
                            <table>
                                <tr>
                                    <td>Đáp án</td>
                                    <td>Đáp án đúng</td>
                                </tr>
                        </HeaderTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <textarea style="width: 400px" rows="3" name="Answer"><%#Eval("Answer") %></textarea>
                                </td>
                                <td>
                                    <asp:Literal runat="server" ID="ltCorrect"></asp:Literal>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <asp:Button ID="btnSave" runat="server" ValidationGroup="ArticleAdd" Text="Cập nhật bài viết" OnClick="btnSave_Click" />
                </td>
            </tr>


        </table>
    </asp:Panel>
</asp:Content>
